﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TaobaoERP.BusinessTaobao.ParObject;
using TaobaoERP.BusinessTaobao.Common;
using TaobaoERP.Entity;
using System.Collections.Specialized;

namespace TaobaoERP.BusinessTaobao.TaobaoAPI
{
    public class ShopAPI
    {
        [AlisoftAPI(apiType = 3, apiname = "apiname")]
        public AliSoftShop Get(string nick)
        {
            ShopGetPar par = new ShopGetPar();
            par.nick = nick;
            return APIUtils.Result<AliSoftShop>(par, (string result) =>
            {
                NameValueCollection ResultPar = new NameValueCollection();
                ResultPar.Add("ID", "cid");
                ResultPar.Add("Name", "name");
                ResultPar.Add("ParentID", "parent_cid");
                ResultPar.Add("IsParent", "is_parent");
                return new XmlHandler<AliSoftShop>().GetItemByXml(result, "rsp/item_cat", ResultPar);
            });
        }
        
    }
}
